package csci5828.search;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class SearchResults {
	
	private String sourceName;
	private Double elapsed;
	private List<SearchResult> results;

	public SearchResults(String sourceName, Double elapsed, List<SearchResult> results) {
		this.sourceName = sourceName;
		this.elapsed = elapsed;
		this.results = Collections.unmodifiableList(new ArrayList<SearchResult>(results));
	}
	
	public String getSourceName() {
		return sourceName;
	}
	
	public Double getElapsed() {
		return elapsed;
	}
	
	public List<SearchResult> getResults() {
		return results;
	}

	
	public String toString() {
		return "SearchResults(source="+this.sourceName+",results="+this.results.size()+")";
	}

}
